home *** CD-ROM | disk | FTP | other *** search
/ Programmer Power Tools / Programmer Power Tools.iso / microcrn / issue_43.arc / 86WRLD43.ARC / 86WORLD.1 next >
Encoding:
Text File  |  1988-07-21  |  1.2 KB  |  42 lines

  1. ; Micro Cornucopia issue #43
  2. ; 86World - Figure 1 MOVMEM Macro
  3.  
  4. DATA    SEGMENT PUBLIC  ;this structure is used by MOVMEM
  5. GDT     DQ      0       ;DUMMY
  6.         DQ      0       ;points to GDT
  7.  
  8.         DW      0FFFFh  ;limit
  9. SRCOFS  DW      (?)     ;low word of base
  10. SRCSEG  DB      (?)     ;high byte of base
  11.         DB      93h     ;access rights
  12.         DW      0       ;reserved
  13.  
  14.         DW      0FFFFh  ;limit
  15. DSTOFS  DW      (?)     ;low word of base
  16. DSTSEG  DB      (?)     ;high byte of base
  17.         DB      93h     ;access rights
  18.         DW      0       ;reserved
  19.  
  20.         DQ      0       ;points to virtual code segment
  21.         DQ      0       ;points to virtual stack segment
  22. DATA    ENDS
  23.  
  24. MOVMEM  MACRO   SrcHigh,SrcLow,DstHigh,DstLow,NumWords
  25.         MOV     AX,SrcHigh
  26.         MOV     SRCSEG,AL
  27.         MOV     AX,SrcLow
  28.         MOV     SRCOFS,AX
  29.  
  30.         MOV     AX,DstHigh
  31.         MOV     DSTSEG,AL
  32.         MOV     AX,DstLow
  33.         MOV     DSTOFS,AX
  34.  
  35.         MOV     AX,DS
  36.         MOV     ES,AX
  37.         MOV     SI,offset GDT
  38.         MOV     CX,NumWords
  39.         MOV     AH,87h
  40.         INT     15h    ;cassette interrupt, extended move function
  41.         ENDM
  42.